cmake_minimum_required(VERSION 3.19)

# env
set(PICO_SDK_PATH /media/tacom/fd1834d9-91ec-45dc-908b-eed1b326caaa/Envs/pico-sdk)
set(PICO_TOOLCHAIN_PATH /media/tacom/fd1834d9-91ec-45dc-908b-eed1b326caaa/Envs/gcc-arm-10)
set(PICO_BOARD pico)
set(PICO_PLATFORM rp2040)

include(pico_sdk_import.cmake)

# project start
project(PICO_SPI_SLAVE_DEMO)

# init pico
pico_sdk_init()

# compile
add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME}
        pico_stdlib
        hardware_spi
)

# use usb to output serial
#pico_enable_stdio_usb(${PROJECT_NAME} 1)
#pico_enable_stdio_uart(${PROJECT_NAME} 0)

# output to elf
pico_add_extra_outputs(${PROJECT_NAME})